import request from "../request";
import { SHOP_ID } from "@/common/contants";
import { INDEX_PAGE_SIZE} from '@/common/contants'
export function getArticleCategory() {
  return request({
    url: "/cms/category/list",
    params:{
        shopId:SHOP_ID 
    }
  });
}

export function getArticleList(categoryId,page=1,pageSize=INDEX_PAGE_SIZE) {
  return request({
    url: "/cms/news/list/v2",
    method:'post',
    params:{
      page,
      pageSize,
      categoryId,
    }
  });
}


export function getArticleDetail(id) {
  return request({
    url: "/cms/news/detail/v2",
    // method:'post',
    params:{
      id
    }
  });
}


export function getBulletin() {
  return request({
    url: "/notice/list",
    method:'post',
    params:{
      type:'ypy',
      pageSize:6
    }
  });
}

export function getBulletinDetail(id) {
  return request({
    url: "/notice/detail",
    params:{
     id
    }
  });
}


